<?php
namespace app\admin\controller;
/*
 *  提取
 * */
use app\common\controller\Admin;
use think\facade\View;
use app\common\model\AuthGroup;
use app\common\model\AuthGroupAccess;

class Cash extends Admin
{
    protected $modelClass = '\app\common\model\CashList';
    
    protected function setLang()
    {
        $this->searchArr = [
            'a.id' => "ID",
            'a.wallet_address' => '提取钱包',
            'a.trade_hash' => '交易哈希',
        ];
    }
    
    public function index()
    {
        $this->_indexSearch();
        $where = [];
        $getSearch = $this->_getSearch();
        if (!empty($getSearch)) $where[] = $getSearch;

        $order = 'a.id desc';
        $dataList = $this->cModel
        ->alias('a')
        ->field('a.*')
        ->where($where)->order($order)->paginate('', false, page_param());
        $all_num = $this->cModel->alias('a')->where($where)->sum("token_money");
        View::assign('all_num', $all_num);
        View::assign('dataList', $dataList);
        return View::fetch();
    }

}